package com.wpw.dream.classloader;

class ClassA {
	public String methodA(String a) {
		return a;
	}
}

public class ClassLoaderTest {

	public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
		/*Class<ClassA> R = (Class<ClassA>) ClassLoaderTest.class.getClassLoader().loadClass("com.wpw.dream.classloader.ClassA");
		System.out.println(R.newInstance().methodA("b"));*/
		ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
		
		
		System.out.println("该类类加载器" + ClassLoader.getSystemClassLoader());
		System.out.println("该类类加载器父类" + ClassLoader.getSystemClassLoader().getParent());
		System.out.println("该类类加载器祖父类" + ClassLoader.getSystemClassLoader().getParent().getParent());
	}
}
